package com.transmifacil;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.RelativeLayout;
import com.google.ads.*;

public class TransmiFacilActivity extends Activity {
	private AdView adView;
	Context context = TransmiFacilActivity.this;
	
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
    	super.onCreate(savedInstanceState);
    	
        setContentView(R.layout.main);
        //load items
//        final AutoCompleteTextView inicial = (AutoCompleteTextView) findViewById(R.id.salida);
//        final AutoCompleteTextView llegada = (AutoCompleteTextView) findViewById(R.id.llegada);
        
        //ad
//        adView = new AdView(this, AdSize.BANNER, "a14eaeb3d03c19a");
        
//        RelativeLayout layout = (RelativeLayout)findViewById(R.id.mainLayout);
//        RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
//                ViewGroup.LayoutParams.WRAP_CONTENT);
//        p.addRule(RelativeLayout.BELOW, R.id.llegada);
        
        String[] estaciones = getResources().getStringArray(R.array.estaciones);
        AutoCompleteTextView salida = (AutoCompleteTextView) findViewById(R.id.salida);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, estaciones);
        salida.setAdapter(adapter);
        
        //Add
//        adView.setLayoutParams(p);
//        layout.addView(adView,p);
//        AdRequest request = new AdRequest();
//        request.setTesting(true);
//        adView.loadAd(request);
        //End Add
        
        //create listener
//        OkListener listener = new OkListener();
//        listener.setContext(context);
//        listener.setInicial(inicial);
//        listener.setLlegada(llegada);
        //add listener
//        inicial.setOnKeyListener(listener);
//        llegada.setOnKeyListener(listener);
    }
    
    
}